package com.xpand.guava;


import com.google.common.collect.Range;
import com.google.common.collect.RangeSet;
import com.google.common.collect.TreeRangeSet;

/**
 * @Author: wei.wang
 * @Description:
 * @Date 2017/12/28 10:35
 * @Modified
 */
public class RangSetTest {
    public static void main(String[] args) {
        RangeSet<Integer> rangeSet = TreeRangeSet.create();

        rangeSet.add(Range.closedOpen(1, 10));

        System.out.println(rangeSet);
        System.out.println(rangeSet.contains(2));
    }
}
